package com.housekeeping.housekeeping.serviceItem.service.impl;

import com.housekeeping.housekeeping.serviceItem.controller.ServiceItemDetailsController;
import com.housekeeping.housekeeping.serviceItem.dao.Impl.ServiceItemDaoImpl;
import com.housekeeping.housekeeping.serviceItem.dao.ServiceItemDao;
import com.housekeeping.housekeeping.serviceItem.entity.ServiceItemDetails;
import com.housekeeping.housekeeping.serviceItem.entity.ServiceItemPage;
import com.housekeeping.housekeeping.serviceItem.service.ServiceItemService;

import java.sql.SQLException;

public class ServiceItemServiceImpl implements ServiceItemService {
    private ServiceItemDao dao=new ServiceItemDaoImpl();
    @Override
    public int add(String aid,ServiceItemPage itemPage, String detailsContext) {
        return dao.add(aid,itemPage,detailsContext);
    }

    @Override
    public ServiceItemPage getItemPage(String aid) throws Exception {
        return dao.getItemPage(aid);
    }

    @Override
    public ServiceItemDetails getItemDetails(String aid) throws SQLException {
        return dao.getItemDetails(aid);
    }

    @Override
    public int update(String aid, ServiceItemPage itemPage, String details) {
        return dao.update(aid,itemPage,details);
    }

    @Override
    public int accountServiceItemExist(String aid) throws SQLException {
        return dao.accountServiceItemExist(aid);
    }
}
